package com.universalInterface.lims_interface.vo.api.param;

import com.universalInterface.lims_interface.common.enums.LabTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @author Lx
 * @date 2023/12/21 11:15
 * @description 创建实验室云空间参数对象
 */
@Data
@Schema(description = "创建实验室云空间参数")
public class CreateSpaceParam implements Serializable {

	private static final long serialVersionUID = -8053185927686211260L;

	@NotBlank(message = "用户名不能为空")
	@Schema(description = "用户名")
	private String user;

	@NotBlank(message = "密码不能为空")
	@Pattern(regexp = "^(?=.*\\d)(?=.*[a-zA-Z])(?=.*[^\\da-zA-Z\\s]).{8,16}$", message = "密码必须包含大小写字母,特殊字符和数字，且长度不低于8位")
	@Schema(description = "密码")
	private String password;

	@NotBlank(message = "实验室名称不能为空")
	@Size(max = 255)
	@Schema(name = "name", description = "实验室名称")
	private String name;

	@NotNull(message = "实验室类型不能为null")
	@Schema(name = "type", description = "实验室类型。HC：焓差；CY：长运；ZY：噪音；SNL：水能力；RB：热泵；GDW：高低温；GLC：高落差；JZLY：集中冷源")
	private LabTypeEnum type;

	@NotNull(message = "实验室通道数量不能为null")
	@Schema(name = "chNum", description = "实验室通道数量")
	private Integer chNum;

}
